package com.hm.service.api.main;

import com.hm.service.framework.PostController;
import com.hm.service.service.main.CaptchaService;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;


@RestController
@RequestMapping(value = "/MAIN", produces = {"application/json;charset=UTF-8"})
public class SZCG_000_000_003 extends PostController {


    private final CaptchaService captchaService;

    //获取验证码接口
    public SZCG_000_000_003(CaptchaService captchaService) {
        this.captchaService = captchaService;
    }

    @PostMapping(value = "/000_000_003")
    public String doPost(HttpServletRequest request) {
        return handleRequest(request);
    }

    @Override
    protected String postRequest(HashMap<String, String> param) {
        HashMap<String, String> captcha = captchaService.getCaptcha();
        return generateSucceed(captcha);
    }
}
